<template>
  <a-modal
    title="工序"
    width="80%"
    :visible="visible"
    :destroyOnClose="true"
    @ok="confirm"
    @cancel="cancel"
  >
    <work-step-table ref="workStepTable" @ok="handleOk"/>
  </a-modal>
</template>

<script>
import workStepTable from '@/views/main/workstep/index.vue'
export default {
  name: 'WorkStepTableSel',
  components: {
    workStepTable
  },
  data() {
    return {
      // 是否可见
      visible: false
    }
  },
  methods: {
    open() {
      this.visible = true
    },
    confirm() {
      this.$emit('confirm', this.$refs.workStepTable.getSelectedRows())
      this.visible = false
    },
    cancel() {
      this.visible = false
    },
    handleOk() {
      this.$emit('ok')
    }
  }
}
</script>

<style scoped>

</style>
